################################################################# 
## Title: Album Addon Block for Smartor's ezPortal 2.1.2
## Author: Smartor <smartor_xp@hotmail.com> - http://smartor.is-root.com
## Description: This file explains you how to create Album Addon block on ezPortal
##		Required Album Addon MOD
##
## Files To Edit: 3
##	portal.php
##	templates/subSilver/portal_body.tpl
##	language/lang_english/lang_main.php
##
## Included Files: N/A
##
################################################################# 

#
#-----[ OPEN ]---------------------------------------------
#
portal.php

#
#-----[ FIND ]----------------------------------------
#
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}

#
#-----[ AFTER ADD ]-----------------------------------
#
//
// Get Newest Pic
//
$sql = "SELECT id, title, username, timestamp FROM phpbb_album ORDER BY timestamp DESC LIMIT 0,1";

if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}

$picrow = $db->sql_fetchrow($result);
//
// END - Get Newest Pic
//


#
#-----[ FIND ]----------------------------------------
#
	'L_VOTE_BUTTON' => $lang['Vote'],

#
#-----[ AFTER ADD ]-----------------------------------
#
	// Photo Album
	'L_NEWEST_PIC' => $lang['Newest_pic'],
	'PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?id=' . $picrow['id']),
	'PIC_TITLE' => $picrow['title'],
	'PIC_POSTER' => $picrow['username'],
	'U_PIC_LINK' => append_sid('album_view.' . $phpEx . '?id=' . $picrow['id']),
	'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['timestamp'], $board_config['board_timezone']),

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/portal_body.tpl

#
#-----[ FIND ]----------------------------------------
#
<a href="{U_INDEX}">{L_FORUM}</a><br />

#
#-----[ AFTER ADD ]-----------------------------------
#
<a href="{U_ALBUM}">{L_ALBUM}</a><br />

#
#-----[ FIND ]----------------------------------------
#
		  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
		   <tr>
			<td class="catHead" height="25"><span class="genmed"><b>{L_STATISTICS}</b></span></td>
		   </tr>
		   <tr>
			<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS}<br />{NEWEST_USER}<br /><br/>{TOTAL_POSTS} {TOTAL_TOPICS}<br />&nbsp;</span></td>
		   </tr>
		  </table>
		  
		  <br />

#
#-----[ AFTER ADD ]-----------------------------------
#
		  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
		   <tr>
			<td class="catHead" height="25"><span class="genmed"><b>{L_NEWEST_PIC}</b></span></td>
		   </tr>
		   <tr>
			<td class="row1" align="left"><span class="gensmall" style="line-height:150%"><center><br /><br /><a href="{U_PIC_LINK}"><img src="{PIC_IMAGE}" border="0" alt="{L_NEWEST_PIC}"></a><br /></center><b>{PIC_TITLE}</b> by <b>{PIC_POSTER}</b><br />on {PIC_TIME}<br />&nbsp;</span></td>
		   </tr>
		  </table>		  

		  <br />

#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]----------------------------------------
#
$lang['No_poll'] = 'No poll at the moment';

#
#-----[ AFTER ADD ]-----------------------------------
#
$lang['Newest_pic'] = 'Newest Pic'; // Album Addon

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
# EoF